package com.lanou.web.controller;

import com.lanou.service.ItemCatService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * Created by QuChao on 2018/11/19
 */
@RestController
public class
ItemCatController {
    @Autowired
    private ItemCatService itemCatService;


    @ApiOperation("向缓存中添加信息")
    @PutMapping("/cat")
    public void addInfo() {
        itemCatService.addInfo();
    }

    @ApiOperation("获取类目信息")
    @GetMapping("/cat")
    public Map<String, Object> getInfo() {
        return itemCatService.getInfo();
    }

}
